from selenium.webdriver.common.by import By


class ExportRecordsLocator:
    # 初始页面展开的tab
    default_page_expanded = (By.CSS_SELECTOR, '[aria-expanded="true"]')
    ###admin端export records页签
    export_records_tab = (By.CSS_SELECTOR, '[path="/console/exportRecords"]')
    #admin端bill页签块
    bill_tab = (By.XPATH, "//div[contains(@data-menu-id, 'BILLS_PLT')]")
    ###user端export records页签
    user_export_records_tab = (By.CSS_SELECTOR, '[path="/work_bench/exportRecords"]')
    ##admin端my resource页签
    admin_myresource = (By.CSS_SELECTOR, '[path="/console/orderManagement/myResource"]')
    #admin端页签
    order_management_tab = (By.XPATH, "//div[contains(@data-menu-id, 'ORDER_MANAGEMENT_PLT')]")
    admin_orders = (By.CSS_SELECTOR, '[path="/console/orderManagement/order"]')
    #user端order 页签
    user_orders_tab = (By.CSS_SELECTOR, '[path="/work_bench/userCenter/order/order"]')
    ##admin income/expense页签
    admin_income = (By.CSS_SELECTOR, '[path="/console/incomeExpense"]')
    user_income = (By.CSS_SELECTOR, '[path="/work_bench/userCenter/fundManagement/incomeExpense"]')
    ##status筛选栏
    status_filter = (By.XPATH, '//span[@class="anticon anticon-filter"]')
    #stautus勾选Export successful
    select_success = (By.XPATH, '//div[@class="antd4-table-filter-dropdown"]/ul/li[1]/span/label/span')
    #stautus勾选File is expired
    select_expired = (By.XPATH, '//div[@class="antd4-table-filter-dropdown"]/ul/li[4]/span/label/span')
    #stautus勾选Export failed
    select_failed = (By.XPATH, '(//input[@type="checkbox"])[3]')
    #status filter下拉框的ok 按钮
    ok_btn = (By.XPATH, '//div[@class="antd4-table-filter-dropdown-btns"]/button[2]')
    reset_btn = (By.XPATH, '//div[@class="antd4-table-filter-dropdown-btns"]/button[1]')
    ####admin端export records表第一个下载按钮
    download_btn = (By.XPATH, '(//button[@class="antd4-btn antd4-btn-link table-operation-btnLine-btn"])[1]')
    #btn = (By.CSS_SELECTOR, '[class="antd4-btn antd4-btn-link table-operation-btnLine-btn"]')
    ##第一行文件status
    file_status_ele = (By.XPATH, '//tr[2]/td[3]/span/span[2]')
    ##start date时间框
    startdate_ele = (By.CSS_SELECTOR, '[placeholder="Start Date"]')
    ##end date时间框
    enddate_ele = (By.CSS_SELECTOR, '[placeholder="End Date"]')
    ##user端income页面，start time时间输入框
    startdate1 = (By.XPATH, '//div[@class="antd4-picker-input antd4-picker-input-active"]/input')
    #income页面结束时间输入框
    enddate1 = (By.XPATH, '//div[@class="antd4-picker-input"]/input')
    ##admin端orders页面下载按钮
    orders_download = (By.XPATH, '//div[@class="icon__content___3VYlg"]/button[2]')
    ##user端的orders页面下载按钮
    user_orders_download = (By.XPATH, '(//button[@class="antd4-btn antd4-btn-default antd4-btn-icon-only"])[2]')
    ###内容加载中的按钮
    loading_button = (By.XPATH, '(//span[@class="antd4-btn-loading-icon"])[2]')
    ##消息提醒
    error_message_ele = (By.CSS_SELECTOR, '[class="antd4-message-custom-content antd4-message-error"]')
    #admin端income/expense页面download按钮
    income_downdload = (By.XPATH, '//div[@class="table-buttons___Bylug"]/button[2]' )
    ##admin端my resource页面下载按钮
    myresource_download = (By.CSS_SELECTOR, '[class="antd4-btn antd4-btn-default antd4-btn-icon-only"]')
    ##admin端my resource页面search按钮
    myresource_search = (By.CSS_SELECTOR, '[class="antd4-btn antd4-btn-primary"]')
    ##admin export records页面标题
    export_records_title = (By.CSS_SELECTOR, '[class="cre-page-container-header-panel-left"]')
    ##customer端order页面搜索按钮
    order_search = (By.CSS_SELECTOR, '[class="antd4-input-group-addon"]')
    ##时间控件的清除按钮
    clear_time = (By.XPATH, '//*[@class="antd4-picker-clear"]/span')
    ##user端搜索orderid
    orderid_search = (By.CSS_SELECTOR, '[placeholder="Search by order ID"]')
    ###user orders页面下载按钮置灰
    download_pray = (By.CSS_SELECTOR, '[class="antd4-btn antd4-btn-default antd4-btn-icon-only"][disabled]')










